Integrand size = 27, antiderivative size = 48 \[ \int \csc ^2(c+d x) \sec ^2(c+d x) (a+b \sin (c+d x)) \, dx=-\frac {b \text {arctanh}(\cos (c+d x))}{d}-\frac {a \cot (c+d x)}{d}+\frac {b \sec (c+d x)}{d}+\frac {a \tan (c+d x)}{d} \]
Time = 0.10 (sec) , antiderivative size = 68, normalized size of antiderivative = 1.42 \[ \int \csc ^2(c+d x) \sec ^2(c+d x) (a+b \sin (c+d x)) \, dx=-\frac {a \cot (c+d x)}{d}-\frac {b \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )}{d}+\frac {b \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )}{d}+\frac {b \sec (c+d x)}{d}+\frac {a \tan (c+d x)}{d} \]
-((a*Cot[c + d*x])/d) - (b*Log[Cos[(c + d*x)/2]])/d + (b*Log[Sin[(c + d*x) /2]])/d + (b*Sec[c + d*x])/d + (a*Tan[c + d*x])/d
Time = 0.39 (sec) , antiderivative size = 42, normalized size of antiderivative = 0.88, number of steps used = 11, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.370, Rules used = {3042, 3317, 3042, 3100, 244, 2009, 3102, 25, 262, 219}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \csc ^2(c+d x) \sec ^2(c+d x) (a+b \sin (c+d x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {a+b \sin (c+d x)}{\sin (c+d x)^2 \cos (c+d x)^2}dx\) |
\(\Big \downarrow \) 3317 |
\(\displaystyle a \int \csc ^2(c+d x) \sec ^2(c+d x)dx+b \int \csc (c+d x) \sec ^2(c+d x)dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a \int \csc (c+d x)^2 \sec (c+d x)^2dx+b \int \csc (c+d x) \sec (c+d x)^2dx\) |
\(\Big \downarrow \) 3100 |
\(\displaystyle \frac {a \int \cot ^2(c+d x) \left (\tan ^2(c+d x)+1\right )d\tan (c+d x)}{d}+b \int \csc (c+d x) \sec (c+d x)^2dx\) |
\(\Big \downarrow \) 244 |
\(\displaystyle \frac {a \int \left (\cot ^2(c+d x)+1\right )d\tan (c+d x)}{d}+b \int \csc (c+d x) \sec (c+d x)^2dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle b \int \csc (c+d x) \sec (c+d x)^2dx+\frac {a (\tan (c+d x)-\cot (c+d x))}{d}\) |
\(\Big \downarrow \) 3102 |
\(\displaystyle \frac {b \int -\frac {\sec ^2(c+d x)}{1-\sec ^2(c+d x)}d\sec (c+d x)}{d}+\frac {a (\tan (c+d x)-\cot (c+d x))}{d}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {a (\tan (c+d x)-\cot (c+d x))}{d}-\frac {b \int \frac {\sec ^2(c+d x)}{1-\sec ^2(c+d x)}d\sec (c+d x)}{d}\) |
\(\Big \downarrow \) 262 |
\(\displaystyle \frac {b \left (\sec (c+d x)-\int \frac {1}{1-\sec ^2(c+d x)}d\sec (c+d x)\right )}{d}+\frac {a (\tan (c+d x)-\cot (c+d x))}{d}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle \frac {a (\tan (c+d x)-\cot (c+d x))}{d}+\frac {b (\sec (c+d x)-\text {arctanh}(\sec (c+d x)))}{d}\) |
3.15.48.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt Q[a, 0] || LtQ[b, 0])
Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.), x_Symbol] :> Int[Expand Integrand[(c*x)^m*(a + b*x^2)^p, x], x] /; FreeQ[{a, b, c, m}, x] && IGtQ[p , 0]
Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[c*(c*x) ^(m - 1)*((a + b*x^2)^(p + 1)/(b*(m + 2*p + 1))), x] - Simp[a*c^2*((m - 1)/ (b*(m + 2*p + 1))) Int[(c*x)^(m - 2)*(a + b*x^2)^p, x], x] /; FreeQ[{a, b , c, p}, x] && GtQ[m, 2 - 1] && NeQ[m + 2*p + 1, 0] && IntBinomialQ[a, b, c , 2, m, p, x]
Int[csc[(e_.) + (f_.)*(x_)]^(m_.)*sec[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> Simp[1/f Subst[Int[(1 + x^2)^((m + n)/2 - 1)/x^m, x], x, Tan[e + f*x]] , x] /; FreeQ[{e, f}, x] && IntegersQ[m, n, (m + n)/2]
Int[csc[(e_.) + (f_.)*(x_)]^(n_.)*((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_), x_S ymbol] :> Simp[1/(f*a^n) Subst[Int[x^(m + n - 1)/(-1 + x^2/a^2)^((n + 1)/ 2), x], x, a*Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n + 1 )/2] && !(IntegerQ[(m + 1)/2] && LtQ[0, m, n])
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n _.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[a Int[(g*Co s[e + f*x])^p*(d*Sin[e + f*x])^n, x], x] + Simp[b/d Int[(g*Cos[e + f*x])^ p*(d*Sin[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, g, n, p}, x]
Time = 0.68 (sec) , antiderivative size = 61, normalized size of antiderivative = 1.27
method | result | size |
derivativedivides | \(\frac {a \left (\frac {1}{\sin \left (d x +c \right ) \cos \left (d x +c \right )}-2 \cot \left (d x +c \right )\right )+b \left (\frac {1}{\cos \left (d x +c \right )}+\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )\right )}{d}\) | \(61\) |
default | \(\frac {a \left (\frac {1}{\sin \left (d x +c \right ) \cos \left (d x +c \right )}-2 \cot \left (d x +c \right )\right )+b \left (\frac {1}{\cos \left (d x +c \right )}+\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )\right )}{d}\) | \(61\) |
parallelrisch | \(\frac {\left (2 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b -2 b \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )+a \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+a \cot \left (\frac {d x}{2}+\frac {c}{2}\right )-6 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-4 b}{2 d \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-2 d}\) | \(91\) |
risch | \(\frac {2 b \,{\mathrm e}^{3 i \left (d x +c \right )}-4 i a -2 b \,{\mathrm e}^{i \left (d x +c \right )}}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right ) \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}-\frac {b \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{d}+\frac {b \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{d}\) | \(96\) |
norman | \(\frac {\frac {a}{2 d}-\frac {5 a \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}-\frac {5 a \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}+\frac {a \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}-\frac {2 b \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {2 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}+\frac {b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}\) | \(149\) |
Time = 0.27 (sec) , antiderivative size = 96, normalized size of antiderivative = 2.00 \[ \int \csc ^2(c+d x) \sec ^2(c+d x) (a+b \sin (c+d x)) \, dx=-\frac {b \cos \left (d x + c\right ) \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) - b \cos \left (d x + c\right ) \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) + 4 \, a \cos \left (d x + c\right )^{2} - 2 \, b \sin \left (d x + c\right ) - 2 \, a}{2 \, d \cos \left (d x + c\right ) \sin \left (d x + c\right )} \]
-1/2*(b*cos(d*x + c)*log(1/2*cos(d*x + c) + 1/2)*sin(d*x + c) - b*cos(d*x + c)*log(-1/2*cos(d*x + c) + 1/2)*sin(d*x + c) + 4*a*cos(d*x + c)^2 - 2*b* sin(d*x + c) - 2*a)/(d*cos(d*x + c)*sin(d*x + c))
\[ \int \csc ^2(c+d x) \sec ^2(c+d x) (a+b \sin (c+d x)) \, dx=\int \left (a + b \sin {\left (c + d x \right )}\right ) \csc ^{2}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx \]
Time = 0.28 (sec) , antiderivative size = 59, normalized size of antiderivative = 1.23 \[ \int \csc ^2(c+d x) \sec ^2(c+d x) (a+b \sin (c+d x)) \, dx=\frac {b {\left (\frac {2}{\cos \left (d x + c\right )} - \log \left (\cos \left (d x + c\right ) + 1\right ) + \log \left (\cos \left (d x + c\right ) - 1\right )\right )} - 2 \, a {\left (\frac {1}{\tan \left (d x + c\right )} - \tan \left (d x + c\right )\right )}}{2 \, d} \]
1/2*(b*(2/cos(d*x + c) - log(cos(d*x + c) + 1) + log(cos(d*x + c) - 1)) - 2*a*(1/tan(d*x + c) - tan(d*x + c)))/d
Leaf count of result is larger than twice the leaf count of optimal. 103 vs. \(2 (48) = 96\).
Time = 0.42 (sec) , antiderivative size = 103, normalized size of antiderivative = 2.15 \[ \int \csc ^2(c+d x) \sec ^2(c+d x) (a+b \sin (c+d x)) \, dx=\frac {6 \, b \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) + 3 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \frac {2 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 15 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 10 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 3 \, a}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}}{6 \, d} \]
1/6*(6*b*log(abs(tan(1/2*d*x + 1/2*c))) + 3*a*tan(1/2*d*x + 1/2*c) - (2*b* tan(1/2*d*x + 1/2*c)^3 + 15*a*tan(1/2*d*x + 1/2*c)^2 + 10*b*tan(1/2*d*x + 1/2*c) - 3*a)/(tan(1/2*d*x + 1/2*c)^3 - tan(1/2*d*x + 1/2*c)))/d
Time = 10.96 (sec) , antiderivative size = 92, normalized size of antiderivative = 1.92 \[ \int \csc ^2(c+d x) \sec ^2(c+d x) (a+b \sin (c+d x)) \, dx=\frac {5\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+4\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-a}{d\,\left (2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\right )}+\frac {a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,d}+\frac {b\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d} \]